package com.saris.primego.dao;

import com.saris.primego.pojo.entity.Employee;
import lombok.NonNull;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface EmployeeRepository extends JpaRepository<Employee, Long>{
    Employee findByUsername(String username);
    Page<Employee> findAll(@NonNull Pageable pageable);
    Page<Employee> findAllByName(String name, Pageable pageable);
}
